package com.appspot.finajjarane.mobile.mvc.controllers;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import com.appspot.finajjarane.framework.generic.Utils;


@Controller
public class Contact {

	@RequestMapping(value="/contact", method= RequestMethod.GET)
	public ModelAndView index(){

		Map<String, Object> map = new HashMap<String, Object>();

		map.put("menuItem", "about");
		map.put("lang", Utils.getLanguage());
		return new ModelAndView("contact", map);
	}

	@RequestMapping(value="/contact", method= RequestMethod.POST)
	public ModelAndView send(	@RequestParam("name") final String name,
								@RequestParam("email") final String email,
								@RequestParam("subject") final String subject,
								@RequestParam("message") final String message
			){

		Map<String, Object> data = new HashMap<String, Object>();

		
		
		data.put("menuItem", "about");
		data.put("lang", Utils.getLanguage());
		return new ModelAndView("contact", data);
	}

}
